#ifndef DEFINE_H
#define DEFINE_H
#define CMD_LS 11
#define CMD_CD 22
#define CMD_GET 33
#define CMD_PUT 44
#define CMD_QUIT 55
#define CMD_ERROR -1

#define E_NOFILE    "ERROR:No such file or directory!\n"
#define E_GET 		 "ERROR:Download error!\n"
#define E_PUT   	 "ERROR:Upload error!\n"
#define GET_LIST_END "SUCCESS:GET LIST SUCCESS!"

char* get_time(char* filename,int filesize,char* buf,int len);
void    ftp_print_help(void);
int     ftp_cmd_analyse(const char* cmd);
int     ftp_getlist(int getsockfd);
int     ftp_putlist(int putsockfd);
int     ftp_getfile(int sockfd,int getsockfd, const char* GET_FILENAME);
int     ftp_putfile(int putsockfd, const char* PUT_FILENAME);
int pasv(int sockfd);
void ls();
void do_ls(char[]);
void do_stat(char*);
void show_file_info(char*,struct stat*);
void mode_str(char*);
char* uid_str(uid_t);
char* gid_str(gid_t);


#endif //DEFINE_H
